<%@ page language="java" pageEncoding="UTF-8" %>
<%@ include file="../../../base/base_list.jsp" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript">
        //设置冗余的生产厂家名称
        function setFactoryName(val) {
            var ele = document.getElementById("factoryName");
            ele.value = val;
        }
    </script>
</head>
<body>
<form method="post">
    <input hidden type="text" name="extCproductId" value="${obj.extCproductId}" title="extCproductId"/>
    <input hidden type="text" name="contractProId" value="${obj.contractProId}" title="contractProId"/>

    <div id="menubar">
        <div id="middleMenubar">
            <div id="innerMenubar">
                <div id="navMenubar">
                    <ul>
                        <li id="save"><a href="#" onclick="formSubmit('update','_self');">确定</a></li>
                        <li id="back"><a href="${pageContext.request.contextPath}/cargo/list">返回</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <div class="textbox" id="centerTextbox">

        <div class="textbox-header">
            <div class="textbox-inner-header">
                <div class="textbox-title">
                    修改附件信息
                </div>
            </div>
        </div>
        <div>
            <div>
                <table class="commonTable" cellspacing="1">
                    <tr>
                        <td class="columnTitle_mustbe">厂家名称：</td>
                        <td class="tableContent">
                            <select name="factoryId" onchange="setFactoryName(this.options[this.selectedIndex].text);" title="factoryId">
                                <option value="">--请选择--</option>
                                <c:forEach items="${factoryList}" var="f">
                                    <option value="${f.factoryId}"
                                            <c:if test="${obj.factoryId==f.factoryId}">selected</c:if>>${f.factoryName}</option>
                                </c:forEach>
                            </select>
                            <input type="hidden" id="factoryName" name="factoryName" value="${obj.factoryName}"/>
                        </td>
                        <td class="columnTitle_mustbe">货号：</td>
                        <td class="tableContent"><input type="text" name="productNo" value="${obj.productNo}" title="productNo"/></td>
                    </tr>
                    <tr>
                        <td class="columnTitle_mustbe">分类：</td>
                        <td class="tableContent">
                            <select name="cType" title="cType">
                                <option value="">--请选择--</option>
                                <c:forEach items="${ctypeList}" var="cl">
                                    <option value="${cl.orderNo}"
                                            <c:if test="${obj.cType==cl.orderNo}">selected</c:if>>${cl.name}</option>
                                </c:forEach>
                            </select>
                        </td>
                        <td class="columnTitle_mustbe">货物照片：</td>
                        <td class="tableContent"><input type="text" name="productImage" value="${obj.productImage}" title="productImage"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="columnTitle_mustbe">数量：</td>
                        <td class="tableContent"><input type="text" name="cNumber" value="${obj.cNumber}" title="cNumber"/></td>
                        <td class="columnTitle_mustbe">包装单位：</td>
                        <td class="tableContent"><input type="text" name="packingUnit" value="${obj.packingUnit}" title="packingUnit""/></td>
                    </tr>
                    <tr>
                        <td class="columnTitle_mustbe">单价：</td>
                        <td class="tableContent"><input type="text" name="price" value="${obj.price}" title="price"/></td>
                        <td class="columnTitle_mustbe">排序号：</td>
                        <td class="tableContent"><input type="text" name="orderNo" value="${obj.orderNo}" title="orderNo"/></td>
                    </tr>
                    <tr>
                        <td class="columnTitle_mustbe">货物描述：</td>
                        <td class="tableContent"><textarea name="productDesc"
                                                           style="height:120px;" title="productDesc">${obj.productDesc}</textarea></td>
                        <td class="columnTitle_mustbe">要求：</td>
                        <td class="tableContent"><textarea name="productRequest"
                                                           style="height:120px;" title="productRequest">${obj.productRequ}</textarea></td>
                    </tr>
                </table>
            </div>
        </div>
</form>
</body>
</html>

